package com.truongnha.clienttn.data.dao;

import android.content.ContentValues;
import android.database.sqlite.SQLiteDatabase;

public class ClassDAO {
	private final SQLiteDatabase db;

	public ClassDAO(SQLiteDatabase db) {
		this.db = db;
	}

	public void delete() {
		db.delete(ClassScheme.TABLE_NAME, null, null);
	}

	public long insert(String name, String teacher, int classId) {
		ContentValues inititalValue = new ContentValues();
		inititalValue.put(ClassScheme.NAME, name);
		inititalValue.put(ClassScheme.TEACHER, teacher);
		inititalValue.put(ClassScheme.CLASS_ID, classId);
		return db.insert(ClassScheme.TABLE_NAME, null, inititalValue);
	}

}